package com.hpin.fansea.adapter;

import android.content.Context;
import android.view.View;
import android.view.ViewGroup;
import android.widget.BaseAdapter;
import android.widget.TextView;

import com.hpin.fansea.R;

/**
 * Created by Aaron on 15/9/15.
 */
public class ExpressAdapter extends BaseAdapter {

    private Context context;

    public ExpressAdapter(Context context) {
        this.context = context;

    }

    @Override
    public int getCount() {
        return 3;
    }

    @Override
    public Object getItem(int position) {
        return null;
    }

    @Override
    public long getItemId(int position) {
        return position;
    }

    @Override
    public View getView(final int position, View convertView, ViewGroup parent) {
        ViewHolder viewHolder=null;
        if (convertView == null) {
            convertView = View.inflate(context, R.layout.item_express, null);
            viewHolder = new ViewHolder();
            viewHolder.tv_goods = (TextView) convertView.findViewById(R.id.tv_goods);
            viewHolder.tv_count = (TextView) convertView.findViewById(R.id.tv_count);
            viewHolder.tv_time = (TextView) convertView.findViewById(R.id.tv_time);
            viewHolder.tv_receiver = (TextView) convertView.findViewById(R.id.tv_receiver);
            viewHolder.tv_status = (TextView) convertView.findViewById(R.id.tv_status);
            convertView.setTag(viewHolder);
        }else{
            viewHolder=(ViewHolder) convertView.getTag();
        }

//        viewHolder.tv_name.setText(cityList.get(position).cityName);

        return convertView;
    }

    private class ViewHolder {
        public TextView tv_goods;
        public TextView tv_count;
        public TextView tv_time;
        public TextView tv_receiver;
        public TextView tv_status;
    }

}
